package ${model.packageName}.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import ${model.packageName}.model.${model.initUpperName}Model;

import io.terminus.common.mysql.dao.MyBatisDao;
import io.terminus.common.model.Paging;

@Repository
public class ${model.initUpperName}Dao extends MyBatisDao<${model.initUpperName}Model> {

	/**
	 *	创建${model.desc}
	 */
	public Boolean create${model.initUpperName}(${model.initUpperName}Model model) {
		return this.create(model);
	}
	/**
	 *	修改${model.desc}
	 */
	public Boolean update${model.initUpperName}(${model.initUpperName}Model model) {
		return this.update(model);
	}
	/**
	 *	删除${model.desc}
	 */
	public Boolean delete${model.initUpperName}(${model.initUpperName}Model model) {
		return this.delete(model.getId());
	}
	/**
	 *	查看${model.desc}
	 */
	public ${model.initUpperName}Model view${model.initUpperName}(${model.initUpperName}Model model){
		return this.sqlSession.selectOne(sqlId("queryOne"), model);
	}
	/**
	 *	列表查询${model.desc}
	 */
	public List<${model.initUpperName}Model> list${model.initUpperName}(${model.initUpperName}Model model){
		return this.list(model);
	}
	/**
	 *	分页查询${model.desc}
	 */
	public Paging<${model.initUpperName}Model> page${model.initUpperName}(Map<String, Object> params, Integer offset, Integer limit){
		return this.paging(offset, limit, params);
	}
}
